package com.stars.easyms.rest.dto;

import com.stars.easyms.base.http.EasyMsRequestEntity;
import com.stars.easyms.rest.bean.RestInfo;
import org.springframework.lang.Nullable;

/**
 * <p>className: EasyMsRestRequestEntity</p>
 * <p>description: rest请求上下文</p>
 *
 * @author guoguifang
 * @version 1.6.1
 * @date 2020/8/16 14:17
 */
public class EasyMsRestRequestEntity<T> {

    /**
     * 请求参数
     */
    private EasyMsRequestEntity requestEntity;

    /**
     * rest信息
     */
    private RestInfo restInfo;

    /**
     * 请求体json串
     */
    private String bodyStr;

    /**
     * 请求体
     */
    private T body;

    public EasyMsRestRequestEntity(EasyMsRequestEntity requestEntity) {
        this.requestEntity = requestEntity;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public void setBodyStr(@Nullable String bodyStr) {
        this.bodyStr = bodyStr;
    }

    public void setRestInfo(RestInfo restInfo) {
        this.restInfo = restInfo;
    }

    public EasyMsRequestEntity getRequestEntity() {
        return requestEntity;
    }

    public RestInfo getRestInfo() {
        return restInfo;
    }

    public String getBodyStr() {
        return bodyStr;
    }

    public T getBody() {
        return body;
    }
}
